/*
 * Copyright (C) 2023 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.templateproject.bean;

//import anet.channel.strategy.dispatch.DispatchConstants;
//import com.taobao.accs.common.Constants;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class Iterm implements IContent {
    private final int code;
    @NotNull
    private final String value;

    public Iterm(int i2, @NotNull String value) {
        Intrinsics.checkNotNullParameter(value, "value");
        this.code = i2;
        this.value = value;
    }

    public static /* synthetic */ Iterm copy$default(Iterm iterm, int i2, String str, int i3, Object obj) {
        if ((i3 & 1) != 0) {
            i2 = iterm.code;
        }
        if ((i3 & 2) != 0) {
            str = iterm.value;
        }
        return iterm.copy(i2, str);
    }

    public final int component1() {
        return this.code;
    }

    @NotNull
    public final String component2() {
        return this.value;
    }

    @NotNull
    public final Iterm copy(int i2, @NotNull String value) {
        Intrinsics.checkNotNullParameter(value, "value");
        return new Iterm(i2, value);
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof Iterm)) {
            return false;
        }
        Iterm iterm = (Iterm) obj;
        return this.code == iterm.code && Intrinsics.areEqual(this.value, iterm.value);
    }

    public final int getCode() {
        return this.code;
    }

    @Override // com.jcds.learneasy.entity.IContent
    @NotNull
    public String getKey() {
        return this.value;
    }

    @Override // com.jcds.learneasy.entity.IContent
    @NotNull
    public String getName() {
        return String.valueOf(this.code);
    }

    @NotNull
    public final String getValue() {
        return this.value;
    }

    public int hashCode() {
        return (this.code * 31) + this.value.hashCode();
    }

    @NotNull
    public String toString() {
        return "Iterm(code=" + this.code + ", value=" + this.value + ')';
    }
}